<template>
    <el-row :gutter="10">
      <el-col :xs="0" :md="2"></el-col>
      <el-col :xs="24" :md="20">
        <el-carousel indicator-position="outside">
          <el-carousel-item v-for="item in imglinks" :key="item">
            <a :href="item.link">
              <div class="image"
                :style="'background-image:url(' + item.img + ')'"
              />
            </a>
          </el-carousel-item>
        </el-carousel>
      </el-col>
      <el-col :xs="0" :md="2"></el-col>
    </el-row>
</template>
<script>
export default {
    name: 'Carousel',
    data() {
        return {
            imglinks: [{img: 'https://i0.wp.com/www.printmag.com/wp-content/uploads/2021/02/4cbe8d_f1ed2800a49649848102c68fc5a66e53mv2.gif', link: 'http://baidu.com'}],
        }
    }
}
</script>

<style scope>
.image {
  background-size: cover;
  background-position: center;
  height: 100%;
  width: 100%;
  background-repeat: no-repeat;
}
</style>